package com.shop.shoporder.common;

import java.util.HashMap;
import java.util.Map;

/**
 * 消息返回码常量类
 */
public class MessageConstants {
    public static final Map<String, String> MSG_SUCCESS = new HashMap<String, String>() {{
        put("000000", "操作成功");
    }};
    public static final Map<String, String> MSG_SYS_ERROR = new HashMap<String, String>() {{
        put("999999", "系统错误");
    }};
    public static final Map<String, String> MSG_ILLEGAL_ARGUMENT = new HashMap<String, String>() {{
        put("999001", "参数有误");
    }};
    public static final Map<String, String> MSG_ITEM_EXISTS = new HashMap<String, String>() {{
        put("999002", "对象已存在");
    }};
    public static final Map<String, String> MSG_ITEM_NOT_EXIST = new HashMap<String, String>() {{
        put("999003", "对象不存在");
    }};
    public static final Map<String, String> MSG_UNUSABLE_STAT = new HashMap<String, String>() {{
        put("999004", "状态错误");
    }};
    public static final Map<String, String> MSG_NO_LOGIN = new HashMap<String, String>() {{
        put("999005", "未登录");
    }};
    public static final Map<String, String> MSG_ACCESS_DENY = new HashMap<String, String>() {{
        put("999006", "访问拒绝");
    }};
    public static final Map<String, String> MSG_INVALID_LOGIN = new HashMap<String, String>() {{
        put("999007", "无效登录");
    }};
    public static final Map<String, String> MSG_VALID_LOGIN = new HashMap<String, String>() {{
        put("999008", "登录有效");
    }};
    public static final Map<String, String> MSG_REMOTE_ACCESS_ERROR = new HashMap<String, String>() {{
        put("999009", "远程访问错误");
    }};
    public static final Map<String, String> MSG_REMOTE_ACCESS_FAILED = new HashMap<String, String>() {{
        put("999010", "远程访问失败");
    }};
    public static final Map<String, String> MSG_OPERATE_FAILED = new HashMap<String, String>() {{
        put("999013", "操作异常");
    }};

    public static final Map<String, String> MSG_REGISTER_FAILED = new HashMap<String, String>() {{
        put("999014", "注册失败");
    }};
    public static final Map<String, String> MSG_EDIT_FAILED = new HashMap<String, String>() {{
        put("999113", "修改购物车失败");
    }};

    public static final Map<String, String> MSG_ADD_FAILED = new HashMap<String, String>() {{
        put("999016", "添加失败");
    }};

    public static final Map<String, String> MSG_DELETE_FAILED = new HashMap<String, String>() {{
        put("999017", "删除失败");
    }};
    public static final Map<String, String> MSG_PAY_ERROR = new HashMap<String, String>() {{
        put("999020", "支付失败");
    }};
    public static final Map<String, String> MSG_CUSTOM(String key, String val) {
        return new HashMap<String, String>() {{
            put(key, val);
        }};
    }
    public static final Map<String, String> MSG_CANCEL_ERROR = new HashMap<String, String>() {{
        put("999021", "取消失败");
    }};
    public static final Map<String, String> MSG_SURE_ERROR = new HashMap<String, String>() {{
        put("999022", "确认失败");
    }};

    public static final Map<String, String> MSG_UP_ERROR = new HashMap<String, String>() {{
        put("999030", "确认失败");
    }};

    public static final Map<String, String> MSG_CUSTOM(String val) {
        return new HashMap<String, String>() {{
            put("999015", val);
        }};
    }


    public static final Map<String, String> MSG_VERIFY_OVERTIME = new HashMap<String, String>() {{
        put("666001", "验证码过期！");
    }};
    public static final Map<String, String> MSG_VERIFY_ERROR = new HashMap<String, String>() {{
        put("666002", "验证码错误！");
    }};
    public static final Map<String, String> MSG_VERIFY_SEND_FAILED = new HashMap<String, String>() {{
        put("666003", "信息发送失败！");
    }};
    public static final Map<String, String> MSG_VERIFY_PHONE_ERROR= new HashMap<String, String>() {{
        put("666004", "手机号错误！");
    }};
    public static final Map<String, String> MSG_VERIFY_SEND_WAITING= new HashMap<String, String>() {{
        put("666005", "请稍后重试！");
    }};
    public static final Map<String, String> MSG_NAMEORPWD_ERROR = new HashMap<String, String>() {{
        put("666006", "用户名或密码错误！");
    }};
    public static final Map<String, String> MSG_NUMBER_FORMAT_ERROR = new HashMap<String, String>() {{
        put("666007", "数字参数有误！");
    }};
    public static final Map<String, String> MSG_MONEY_NOT_ENOUGH= new HashMap<String, String>() {{
        put("666008", "数量不够！");
    }};
    public static final Map<String, String> MSG_USER_INEXISTENCE= new HashMap<String, String>() {{
        put("666009", "用户不存在！");
    }};
    public static final Map<String, String> MSG_REQUEST_STATE= new HashMap<String, String>() {{
        put("666010", "请求数据不存在！");
    }};
    public static final Map<String, String> TOKEN_UNEXIT= new HashMap<String, String>() {{
        put("666011", "token为空！");
    }};

    public static final Map<String, String> TOKEN_VERIFY= new HashMap<String, String>() {{
        put("666012", "token已过期！");
    }};
    public static final Map<String, String> TOKEN_ERROR= new HashMap<String, String>() {{
        put("666012", "token错误！");
    }};
    public static final Map<String, String> COLLECT= new HashMap<String, String>() {{
        put("666013", "已收藏！");
    }};
    public static final Map<String, String> NO_APPLY_STORE= new HashMap<String, String>() {{
        put("666014", "未申请店铺！");
    }};

    public static final Map<String, String> STORE_EXIT= new HashMap<String, String>() {{
        put("666015", "店铺已经存在，不能在申请！");
    }};
    public static final Map<String, String>STORE_UNEXIT= new HashMap<String, String>() {{
        put("666016", "请店铺不存在！");
    }};

    public static final Map<String, String> UNGROUPBUY= new HashMap<String, String>() {{
        put("666017", "该商品没有团购活动！");
    }};

    public static final Map<String, String> UNRANK= new HashMap<String, String>() {{
        put("666018", "用户等级还没达到店主！");
    }};

    public static final Map<String, String> UNGROUPBUYGOODCOUNT= new HashMap<String, String>() {{
        put("666019", "团购商品的数量不足！");
    }};

    public static final Map<String, String> MAX_GROUPBUY_COUNT= new HashMap<String, String>() {{
        put("666020", "该商品以达到团购的最大团购数量！");
    }};

    public static final Map<String, String> GOODS_GROUPBUY_COUNT= new HashMap<String, String>() {{
        put("666021", "团购活动未结束，同一个商品每人只能发起一次！");
    }};

    public static final Map<String, String> UNGROUPBUY_STAND= new HashMap<String, String>() {{
        put("666022", "上次团购不达标，需15天后才能再次发起团购！");
    }};

}
